cmake_minimum_required(VERSION 3.0.2)
project(gmap)

# set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
add_definitions(-std=c++14 )
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  message_filters
  #mav_msgs
  geometry_msgs
  sensor_msgs
  gazebo_msgs
  tf
  nav_msgs
  message_generation
  std_msgs
  image_transport
  cv_bridge
)

add_message_files(
  FILES
  GMMCommunication.msg
) 

generate_messages(
  DEPENDENCIES
  std_msgs
)

# find_package(PythonLibs 2.7)
# find_package(PCL 1.8 REQUIRED)
# find_package(OpenCV REQUIRED)
# set(PCL_INCLUDE_DIRS /usr/local/include/pcl-1.8)
# add_definitions(${PCL_DEFINITIONS})
# find_package(Eigen3 REQUIRED)
# include_directories(${EIGEN3_INCLUDE_DIRS})
# include_directories(/home/pp/catkin_ws/src/formation_avoidance/include)
# include_directories("/home/pp/Downloads/matplotlib-cpp")
# include_directories(${PYTHON_INCLUDE_DIRS})
# catkin_package( CATKIN_DEPENDS message_runtime INCLUDE_DIRS include)

# include_directories(${PCL_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
# include_directories(${OpenCV_INCLUDE_DIRS})
# include_directories(${PROJECT_SOURCE_DIR}/include)
# include_directories("/usr/include/pcl-1.8")
find_package(PythonLibs 2.7)
find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIRS})
include_directories(${PYTHON_INCLUDE_DIRS})
catkin_package( CATKIN_DEPENDS message_runtime)

include_directories(${PCL_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/include)

# add_executable(gmm_node src/gmm_node.cpp  )
# target_link_libraries(gmm_node ${OpenCV_LIBS} ${PCL_LIBRARIES} ${catkin_LIBRARIES})

add_executable(gmap_node src/gmm_node_convert.cpp  )
target_link_libraries(gmap_node ${OpenCV_LIBS} ${PCL_LIBRARIES} ${catkin_LIBRARIES})

add_executable(convert2gmap src/convert_pointcloud.cpp  )
target_link_libraries(convert2gmap ${catkin_LIBRARIES}  ${PCL_LIBRARIES} ${OpenCV_LIBS})

add_executable(gmap_plot src/gmap_plot.cpp )
target_link_libraries(gmap_plot ${OpenCV_LIBS} ${PCL_LIBRARIES} ${catkin_LIBRARIES})

add_executable(pc_plot src/pc_plot.cpp )
target_link_libraries(pc_plot ${OpenCV_LIBS} ${PCL_LIBRARIES} ${catkin_LIBRARIES})
